using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_UIAudioManager_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.UIAudioManager);
            args = new Type[]{typeof(UnityEngine.Transform)};
            method = type.GetMethod("Initial", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Initial_0);
            args = new Type[]{typeof(UnityEngine.AudioClip)};
            method = type.GetMethod("Play", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Play_1);
            args = new Type[]{typeof(System.String), typeof(System.String)};
            method = type.GetMethod("Play", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Play_2);
            args = new Type[]{};
            method = type.GetMethod("PointerEntry", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, PointerEntry_3);
            args = new Type[]{};
            method = type.GetMethod("PointerLeave", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, PointerLeave_4);
            args = new Type[]{};
            method = type.GetMethod("PointerDown", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, PointerDown_5);
            args = new Type[]{};
            method = type.GetMethod("PointerUp", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, PointerUp_6);
            args = new Type[]{};
            method = type.GetMethod("OnClick", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, OnClick_7);
            args = new Type[]{};
            method = type.GetMethod("Stop", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Stop_8);
            args = new Type[]{typeof(System.Single)};
            method = type.GetMethod("ChangeVolume", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, ChangeVolume_9);

            field = type.GetField("pointerEntry", flag);
            app.RegisterCLRFieldGetter(field, get_pointerEntry_0);
            app.RegisterCLRFieldSetter(field, set_pointerEntry_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_pointerEntry_0, AssignFromStack_pointerEntry_0);
            field = type.GetField("pointerLeave", flag);
            app.RegisterCLRFieldGetter(field, get_pointerLeave_1);
            app.RegisterCLRFieldSetter(field, set_pointerLeave_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_pointerLeave_1, AssignFromStack_pointerLeave_1);
            field = type.GetField("pointerDown", flag);
            app.RegisterCLRFieldGetter(field, get_pointerDown_2);
            app.RegisterCLRFieldSetter(field, set_pointerDown_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_pointerDown_2, AssignFromStack_pointerDown_2);
            field = type.GetField("pointerUp", flag);
            app.RegisterCLRFieldGetter(field, get_pointerUp_3);
            app.RegisterCLRFieldSetter(field, set_pointerUp_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_pointerUp_3, AssignFromStack_pointerUp_3);
            field = type.GetField("onClick", flag);
            app.RegisterCLRFieldGetter(field, get_onClick_4);
            app.RegisterCLRFieldSetter(field, set_onClick_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_onClick_4, AssignFromStack_onClick_4);
            field = type.GetField("Open", flag);
            app.RegisterCLRFieldGetter(field, get_Open_5);
            app.RegisterCLRFieldSetter(field, set_Open_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_Open_5, AssignFromStack_Open_5);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.UIAudioManager());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.UIAudioManager[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Initial_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Transform @root = (UnityEngine.Transform)typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);


            huqiang.UIAudioManager.Initial(@root);

            return __ret;
        }

        static StackObject* Play_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AudioClip @clip = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);


            huqiang.UIAudioManager.Play(@clip);

            return __ret;
        }

        static StackObject* Play_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @assetName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.String @bundleName = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);


            huqiang.UIAudioManager.Play(@bundleName, @assetName);

            return __ret;
        }

        static StackObject* PointerEntry_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.PointerEntry();

            return __ret;
        }

        static StackObject* PointerLeave_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.PointerLeave();

            return __ret;
        }

        static StackObject* PointerDown_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.PointerDown();

            return __ret;
        }

        static StackObject* PointerUp_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.PointerUp();

            return __ret;
        }

        static StackObject* OnClick_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.OnClick();

            return __ret;
        }

        static StackObject* Stop_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);


            huqiang.UIAudioManager.Stop();

            return __ret;
        }

        static StackObject* ChangeVolume_9(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @value = *(float*)&ptr_of_this_method->Value;


            huqiang.UIAudioManager.ChangeVolume(@value);

            return __ret;
        }


        static object get_pointerEntry_0(ref object o)
        {
            return huqiang.UIAudioManager.pointerEntry;
        }

        static StackObject* CopyToStack_pointerEntry_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.pointerEntry;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_pointerEntry_0(ref object o, object v)
        {
            huqiang.UIAudioManager.pointerEntry = (UnityEngine.AudioClip)v;
        }

        static StackObject* AssignFromStack_pointerEntry_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.AudioClip @pointerEntry = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.UIAudioManager.pointerEntry = @pointerEntry;
            return ptr_of_this_method;
        }

        static object get_pointerLeave_1(ref object o)
        {
            return huqiang.UIAudioManager.pointerLeave;
        }

        static StackObject* CopyToStack_pointerLeave_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.pointerLeave;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_pointerLeave_1(ref object o, object v)
        {
            huqiang.UIAudioManager.pointerLeave = (UnityEngine.AudioClip)v;
        }

        static StackObject* AssignFromStack_pointerLeave_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.AudioClip @pointerLeave = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.UIAudioManager.pointerLeave = @pointerLeave;
            return ptr_of_this_method;
        }

        static object get_pointerDown_2(ref object o)
        {
            return huqiang.UIAudioManager.pointerDown;
        }

        static StackObject* CopyToStack_pointerDown_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.pointerDown;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_pointerDown_2(ref object o, object v)
        {
            huqiang.UIAudioManager.pointerDown = (UnityEngine.AudioClip)v;
        }

        static StackObject* AssignFromStack_pointerDown_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.AudioClip @pointerDown = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.UIAudioManager.pointerDown = @pointerDown;
            return ptr_of_this_method;
        }

        static object get_pointerUp_3(ref object o)
        {
            return huqiang.UIAudioManager.pointerUp;
        }

        static StackObject* CopyToStack_pointerUp_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.pointerUp;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_pointerUp_3(ref object o, object v)
        {
            huqiang.UIAudioManager.pointerUp = (UnityEngine.AudioClip)v;
        }

        static StackObject* AssignFromStack_pointerUp_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.AudioClip @pointerUp = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.UIAudioManager.pointerUp = @pointerUp;
            return ptr_of_this_method;
        }

        static object get_onClick_4(ref object o)
        {
            return huqiang.UIAudioManager.onClick;
        }

        static StackObject* CopyToStack_onClick_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.onClick;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_onClick_4(ref object o, object v)
        {
            huqiang.UIAudioManager.onClick = (UnityEngine.AudioClip)v;
        }

        static StackObject* AssignFromStack_onClick_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.AudioClip @onClick = (UnityEngine.AudioClip)typeof(UnityEngine.AudioClip).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.UIAudioManager.onClick = @onClick;
            return ptr_of_this_method;
        }

        static object get_Open_5(ref object o)
        {
            return huqiang.UIAudioManager.Open;
        }

        static StackObject* CopyToStack_Open_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.UIAudioManager.Open;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_Open_5(ref object o, object v)
        {
            huqiang.UIAudioManager.Open = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_Open_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @Open = ptr_of_this_method->Value == 1;
            huqiang.UIAudioManager.Open = @Open;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.UIAudioManager();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
